FORMULA_CURVE

Description

This element creates a curve defined by a mathematical formula (y=f(x)).

Common Attributes

See the curve element attributes. The FORMULA_PARAM attribute does not have the persistent attribute since its value is computed with a formula.

Specific Attributes
Name Value Type Default Value Description Comment V.

formula

a mathematical formula

Empty.

Mathematical formula for the curve.

The formula can reference any parameter, curve or surface available in the skin.

1.6

variable

string

x

name of the "x" variable in the formula.

You can customize the name of the traditional "x" variable in y=f(x) formula so that it becomes y=f(variable)

1.6

Examples

The code below creates a curve ("curve") that can be displayed on a graph. The name of the variable used in the formula is customized ("z").

    <FORMULA_CURVE  id="curve" formula="cos(z)" variable="z"/>